package com.ht.module.bus.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ht.module.bus.entity.BusRoom;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ht.util.Pager;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 房间表 Mapper 接口
 * </p>
 *
 * @author hejialun
 * @since 2024-11-25
 */
public interface BusRoomMapper extends BaseMapper<BusRoom> {

    /**
     * 查询当前用户加入的房间
     * @param pager
     * @param qw
     * @param userId
     * @return
     */
    Pager<BusRoom> findStartRoomByUser(@Param("pager") Pager<BusRoom> pager,
                                       @Param(Constants.WRAPPER) QueryWrapper<BusRoom> qw,
                                       @Param("userId") String userId);
}
